package com.liusaidh.result;

/**
 * @author liusaidh
 * @date 2024/6/4 20:37
 * @description  状态码的枚举类
 */
public enum Status {
    OK(200,"请求成功"),
    FAIL(-1,"请求失败"),
    SYSTEM_ERROR(101,"系统异常"),
    SQL_ERROR(109,"SQL语句异常"),

    INVALID_REQUEST_PARAM_ERROR(2024001, "请求参数不合法"),

    FILE_IS_ERROR(2004002,"头像不合法！");

    private Integer code;
    private String message;
    Status(Integer code,String message){
        this.code=code;
        this.message=message;
    }
    public Integer getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return code+":"+message;
    }
}
